package cn.zyjw.controller;


import cn.zyjw.domain.WorkIssue;
import cn.zyjw.model.R;
import cn.zyjw.service.WorkIssueService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Api(tags = "客服工单")
@RequestMapping("/workIssues")
public class WorkIssueController {

    @Autowired
    private WorkIssueService workIssueService;

    @GetMapping
    @ApiOperation("列表分页查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "current", value = "当前页"),
            @ApiImplicitParam(name = "size", value = "每页展示条数"),
    })
    public R<Page<WorkIssue>> findByPage(Page<WorkIssue> page) {
        Page<WorkIssue> workIssuePage = workIssueService.findByPage(page);
        return R.ok(workIssuePage);
    }
}
